@import "./transition";
@import "./dialog";
@import "./button";
@import "./el-overlay";
@import "./alert";
$--space-width: 0;
// 定义表单tooltip 颜色变量
$warning-color: #ef832d;
$error-color: #f56c6c;

.common-wrap {
  box-sizing: border-box;
  padding: $--space-width;
  overflow: hidden;
  height: 100%;
  width: 100%;
}

* {
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    sans-serif !important
}

.common-fff {
  background: #fff;
}

// 处理auto-complete组件中，类为warning出现感叹号，input的样式问题
.el-autocomplete.warning {
  .el-input__wrapper {
    // 如果没有下面这一行样式的话 无法对border进行自定义修改
    box-shadow: 0 0 0 1px $warning-color;
  }
}

// 处理客商全部批量导出不换行问题
.el-message-box__message {
  width: calc(100% - 38px);
}

.el-button {
  padding: 7px 16px;
}

// 处理ui走按钮间距样式
.el-button+.el-button {
  margin-left: 8px;
}

.con-button-rows .el-button:active {
  color: #606266;
  border-color: #dcdfe694;
  background-color: #ffffff;
  outline: none;
}

.con-button-rows .el-button:focus {
  color: #606266;
  border-color: #dcdfe694;
  background-color: #ffffff;
  outline: none;
}

.con-button-rows .el-button:hover {
  color: #fff;
  border-color: #c0c5d1;
  background-color: #eb5c2069;
  outline: none;
}


.warning-span {
  color: $warning-color;
}

// 修改的是auto-complete组件的tooltip内容
.warning-popper.el-popper.is-light {
  color: white;
  background: $warning-color;
  border: none;

  .el-popper__arrow::before {
    background: $warning-color;
  }
}

.error-span {
  color: $error-color;
}

// 修改的是输入框后端返回error的tooltip内容
.error-popper.el-popper.is-light {
  color: white;
  background: $error-color;
  border: none;

  .el-popper__arrow::before {
    background: $error-color;
  }
}

.formPop {
  padding: 0 !important;
}

//弹框样式
.el-dialog__title {
  // font-family: Inter, 'Helvetica Neue', Helvetica, 'PingFang SC',
  //   'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
}

// el-tab样式
.el-tabs__nav-scroll {
  // font-family: Inter, 'Helvetica Neue', Helvetica, 'PingFang SC',
  //   'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;

  .is-active {
    color: #eb5c20 !important;
  }

  .el-tabs__active-bar {
    background-color: #eb5c20;
  }
}

.el-tabs__nav-wrap::after {
  height: 1px !important;
}

// 页面按钮样式
.search-btn {
  // font-family: Inter, 'Helvetica Neue', Helvetica, 'PingFang SC',
  //   'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
  font-size: 13px;
  line-height: 32px;
  text-align: center;
  cursor: pointer;
  background: #fff;
  border: 1px solid #dcdcdc;
  border-radius: 4px;

  &:hover {
    color: #fff;
    background-color: #eb5c20;
  }
}

// 弹框保存按钮样式
.save-btn {
  background: #eb5c20;
  border-radius: 4px;

  &:hover,
  &:focus {
    background: rgba(235, 92, 32, 0.4117647059);
  }

  &:disabled,
  &:disabled:hover {
    color: #ffff;
    background-color: #c0c4d1ff;
  }

  span {
    // font-family: Inter, 'Helvetica Neue', Helvetica, 'PingFang SC',
    //   'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 18px;
    color: #fff;
  }
}

// 固定在页面下方的保存div
.fixed-bottom-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 99;
  width: 100%;
  height: 50px;
  padding: 10px 0;
  text-align: center;
  background-color: #fff;
  box-shadow: 0 0 3px grey;

  .save-btn {
    width: 86px;
    height: 32px;
  }
}

// 弹框取消按钮样式
.cancel-btn {
  background: #fff;
  border: 1px solid #dcdcdc;
  border-radius: 4px;

  &:hover,
  &:focus {
    background: #f1f2f5ff;
    border-color: #dcdcdc;
  }

  span {
    // font-family: Inter, 'Helvetica Neue', Helvetica, 'PingFang SC',
    //   'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 18px;
    color: #333;
  }
}

.dialog-footer {
  display: flex;
  justify-content: center;
}

.common-box {
  padding: 10px 15px 3px 10px;
  background: #fff;

  .el-tabs__header {
    margin-bottom: 20px;
  }
}

.common-table {
  width: inherit;
  // margin: 10px 0;
}

.con-button-rows {
  margin-bottom: $--space-width;
  height: 40px;
}

.app-container {
  padding: 10px;
}

.search-container {
  padding: 18px 0 0 10px;
  margin-bottom: 10px;
  background-color: var(--el-bg-color-overlay);
  border: 1px solid var(--el-border-color-light);
  border-radius: 4px;
  box-shadow: var(--el-box-shadow-light);
}

.table-container>.el-card__header {
  padding: calc(var(--el-card-padding) - 8px) var(--el-card-padding);
}

.link-type,
.link-type:focus {
  color: #337ab7;
  cursor: pointer;

  &:hover {
    color: rgb(32 160 255);
  }
}

// .el-input__inner {
//   text-align: left;
//   color: #161616 !important;
// }
// .el-select__placeholder{
//   color: #161616 !important;
// }

// .is-transparent{
//   color: #606266 !important;
// }

.el-button-group .el-button.el-button-plus {
  background: #eb5c20 !important;
  color: #fff !important;
}

.el-button-group .el-button.el-button-plus:hover {
  background: #eb5c20 !important;
  color: #fff !important;
}

.el-button-group .el-button.el-button-plus.is-disabled {
  background: #eb5c20 !important;
  color: #fff !important;
}

.el-button-group .el-button.el-button-plus.is-disabled:hover {
  background: #eb5c20 !important;
  color: #fff !important;
}


// 全局图标
.el-button-group>.el-button:active {
  color: #606266 !important;
  background: #3a3b6d63;

}

.el-button-group .el-button.is-disabled,
.el-button-group .el-button.is-disabled:hover {
  background-color: var(--el-button-disabled-bg-color) !important;
  background-image: none !important;
  border-color: var(--el-button-disabled-border-color) !important;
  color: var(--el-button-disabled-text-color) !important;
  cursor: not-allowed;
}


//  用于隐藏缩小的弹窗
#hide-minus-dialogs {
  position: fixed;
  width: 0;
  height: 0;
  overflow: hidden;
  opacity: 0;

  >div {
    display: none;
  }
}

// :deep() .vxe-table {
//   &::-webkit-scrollbar {
//     width: 5px;
//     background-color: transparent;
//   }
//   &::-webkit-scrollbar-thumb {
//     background: red;
//   }
// }

.websocket-notify-box {
  display: -webkit-box;
  max-height: 8em;
  /* 控制显示的高度 */
  overflow: hidden;
  line-height: 22px;
  text-overflow: ellipsis;
  -webkit-line-clamp: 4;
  /* 控制显示的行数 */
  -webkit-box-orient: vertical;
  cursor: pointer;
}

.websocket-message-detail {
  .el-message-box__btns {
    justify-content: flex-end !important;

    button {
      color: #606266;
      background-color: #fff !important;
      border-color: #dcdfe694;
      outline: none !important;
    }
  }

  .el-message-box__header {
    .el-message-box__title {
      font-size: 14px;
      font-weight: 600 !important;
    }

    border-bottom: 1px solid #ededed;
  }
}

.vxe-table--ignore-clear {
  width: auto;
  max-width: 600px;
  overflow: hidden;
}

.el-popover.el-popper {
  &.select-hour-popover {
    width: 322px !important;
    padding: 0 !important;

    // box-shadow: 0 0 12px rgb(0 0 0 / 12%);
    &.select-hour-popover-hide {
      width: 0 !important;
      height: 0 !important;
      overflow: hidden;
      border: none;
      outline: none;
      box-shadow: none;
    }
  }

  .select-hour {
    width: 0;
    height: auto;
    min-height: 100px;
    overflow: hidden;
    font-size: 14px;
    color: #666;
    background: #fff;
    background-color: #fff;

    &.select-hour-show {
      width: 322px;
    }

    .date {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 10px;
      border-bottom: 1px solid #e4e7ed;
    }

    .active {
      color: #ef832d;
      background-color: #f9f9fb;
    }

    .hours {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      height: 0;
      overflow: hidden;
      transition: all 0.2s;

      &.hours-show {
        height: auto;
        padding: 10px;
      }

      span {
        display: inline-block;
        line-height: 30px;
        text-align: center;
        cursor: pointer;

        &:hover {
          background: #f3f4f6;
        }
      }
    }

    .minute {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      height: 0;

      &.minute-show {
        height: auto;
        padding: 10px;
      }

      span {
        display: inline-block;
        line-height: 30px;
        text-align: center;
        cursor: pointer;

        &:hover {
          background: #f3f4f6;
        }
      }
    }

    .minute,
    .hours {
      span {
        &.disabled {
          cursor: not-allowed !important;
          opacity: 0.5;
        }
      }
    }
  }
}

.ellipsis {
  overflow: hidden;
  /* 确保超出容器的内容被裁剪 */
  text-overflow: ellipsis;
  /* 超出部分显示省略号 */
  white-space: nowrap;
  /* 确保文本在一行内显示 */
}

.filter-poper-select--hide {
  display: none;
}

.btn-gap-left {
  margin-left: 8px;
}

.btn-gap-right {
  margin-right: 8px;
}

// .vgl-item {
//   height: auto !important;
// }

.color-text {
  color: #409eff
}

.flex-wrap {
  display: flex;
  flex-wrap: wrap;
  padding: 10px 0;
  font-size: 13px;
}

.release-application-goods {
  height: 20px;
  padding: 0 3px;
  margin-left: 8px;
  font-size: 12px;
  line-height: 20px;
  color: #f56c6c;
  text-align: center;
  border: 1px solid #f56c6c;
  border-radius: 4px;
  margin-left: 5px;
  cursor: pointer;
}

.flex-table-center-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}